import { _decorator, Asset, Component, director, find, game, instantiate, Node, Prefab, Scene, SceneAsset, Sprite, SpriteFrame, Texture2D } from 'cc';
import { AssetsManager } from '../../Framework/Runtime/AssetsManager/AssetsManager';
import { Entrance } from '../../Framework/Runtime/Entrance';
const { ccclass, property } = _decorator;

@ccclass('Launcher')
export class Launcher extends Entrance {
    protected async onLoadBundles(): Promise<void> {
        await AssetsManager.instance.preloadBundle("StartBundle")
    }
    protected async onEnter() {
        const scene = await AssetsManager.instance.load<SceneAsset>("StartBundle", "GameScene", SceneAsset);
        await new Promise((resolve, reject) => {
            setTimeout(resolve, 1000)
        })
        director.runScene(scene);
    }


    
}


